package com.action;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class CommonAction extends HttpServlet {
	/**
	 * 
	 */
	private static final long serialVersionUID = 7340371661786533082L;

	protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException {
		this.doPost(arg0, arg1);
	}
	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String s = request.getParameter("s");
		try {
			BaseAction http = (BaseAction) Class.forName("com.action."+s+"Action").newInstance();
			http.doPost(request, response);
		} catch (Exception e) {
			e.printStackTrace();
		} 
	}
	
}


